package com.ostrich.cloud.ostrichUserService.client;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.ostrichUserService.param.CusPasswordParam;
import com.ostrich.ostrichUserService.param.admin.RegAdminParam;
import com.ostrich.ostrichUserService.param.bussiness.LoginBusParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "adminMangerClient",name="ostrichUserService")
@Api("管理员")
public interface AdminMangerClient {

    @PostMapping("addAdmin")
    public Result addAdmin(@RequestBody RegAdminParam regAdminParam);

    @PostMapping("adminLogin")
    @ApiOperation("管理员登录的接口")
    public Result adminLogin(@RequestBody LoginBusParam loginBusParam);

    @DeleteMapping("updateAdminPassword")
    @ApiOperation("修改管理员登录密码")
    public Result updateAdminPassword (@RequestBody CusPasswordParam cusPasswordParam);


    @GetMapping("getAllAdmins")
    @ApiOperation("获取所有的管理员")
    public Result getAllAdmins(@RequestParam("current") Integer current
            ,@RequestParam("size") Integer size,@RequestParam("status") String status);

    @PutMapping("updateAdmin")
    @ApiOperation("修改管理员状态")
    public  Result updateAdmin(@RequestParam("parentId") Integer parentId,
                               @RequestParam("status") String status);

}
